<!doctype html>
<html>
<head>
    <meta charset="UTF-8" />
    <title>核销</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/Wx/css/base.css" />
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/Wx/css/detail.css" />
</head>
<body>
<div class="detail">
    <form action="__MODULE__/Receive/pickup" method="post" class="cancel_form">
        <div class="import"><input type="text" name="receive" placeholder="输入取货码"/></div>
        <div class="button"><input type="submit" value="查看订单"/></div>
    </form>
</div>
<div class="receive"></div>
<script type="text/javascript" src="__PUBLIC__/Wx/js/jquery-1.9.1.js"></script>
<script src="__PUBLIC__/js/jquery.form.js"></script>
<script src="__PUBLIC__/js/layer/layer.js"></script>
<script type="text/javascript">
    //表单提交
    $(".cancel_form").ajaxForm({
        //定义返回JSON数据，还包括xml和script格式
        datatype:'JSON',
        success:function (d) {
            if(d.state > 0){
                layer.msg(d.val,{icon:1,time:1000},function () {
                    window.location.reload();
                });
            }else{
                window.location.href="__MODULE__/Receive/cancel/sn/"+d.order_sn;
            }//end if

            // console.log(d);
        }
    })
</script>
</body>
</html>